package chapter09;

/**
 * Created by V5470-I5 on 2016/4/1.
 */
import  java.util.*;
public class ForEach {
    public static void main(String[] args){
        List names=Arrays.asList("Messi","Suares","Neymar");
        forEach(names);
        forEach(new HashSet(names));
        forEach(new ArrayDeque(names));
    }
    static void forEach(Iterable iterable){
        for(Object o:iterable){
            System.out.println(o);
        }
    }
}
